package 工厂模式.简单工厂模式;

public class HumanFactory {
    public static <T extends Human> T createHuman(Class<T> c) throws Exception {
        Human human = (Human)Class.forName(c.getName()).newInstance();
        return (T) human;
    }
}
